<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Cache-Control" content="no-siteapp" />

    <title>A luarocks build plugin for lua module with c/c++ based on xmake</title>
    <meta name="description" content="luarocks is a package management tool of lua, which provides the installation and integration of various lua modules.When users install lua modules, it will ...">

    
    <meta name="keywords" content="xmake,lua,C/C++,toolchains,xrepo,packages,vcpkg,conan,Apple,Silicon,tboox" /> 

    <!-- qq oauth -->
    <meta property="qc:admins" content="5211601217706727767255" />

    <!--icon -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" sizes="192x192" href="/static/img/nice-highres.png" />
	<link rel="apple-touch-icon-precomposed" href="/static/img/apple-touch-icon-57x57-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/apple-touch-icon-72x72-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/apple-touch-icon-114x114-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/apple-touch-icon-144x144-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/img/retinahd_icon.png" />
	<meta name="msapplication-TileImage" content="/static/img/retinahd_icon.png" />
	
    <link rel="stylesheet" href=" /css/fontawesome/css/font-awesome.min.css ">
    <link rel="stylesheet" href=" /css/main.css ">
    <link rel="canonical" href="https://tboox.org/2021/01/22/luarocks-build-xmake-v1.0/">
    <link rel="alternate" type="application/rss+xml" title="TBOOX Open Source Project" href="https://tboox.org/feed.xml ">
    <link rel="alternate" hreflang="en" href="https://tboox.org/" />
    <link rel="alternate" hreflang="zh-Hans" href="https://tboox.org/cn/" />




    <script type="text/javascript">
    function isPC(){    
        var userAgentInfo = navigator.userAgent;  
        var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");    
        var flag = true;    
        for (var v = 0; v < Agents.length; v++) {    
            if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }    
        }    
        return flag;    
    }
    </script>

<!-- baidu ads -->



    <!-- baidu ads -->

</head>


  <body>

    <header id="top">
    <div class="wrapper">
        <a href="/" class="brand">TBOOX</a>
        <button id="headerMenu" class="menu"><i class="fa fa-bars"></i></button>
        <nav id="headerNav">
            <ul>
                <li>
                    
                    <a href="/cn?lang=0">
                    
                        <i class="fa fa-home"></i>中文
                    </a>
                </li>

                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/project/">
                            
                        
                            <i class="fa fa-bookmark"></i>Projects
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/archive/">
                            
                        
                            <i class="fa fa-archive"></i>Archives
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/category/">
                            
                        
                            <i class="fa fa-th-list"></i>Categories
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/tag/">
                            
                        
                            <i class="fa fa-tags"></i>Tags
                        </a>
                    </li>
                    
                    
                    
                
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/docs/">
                            
                        
                            <i class="fa fa-book"></i>Documents
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="https://xmake.io/#/about/contact" target="_blank" >
                            
                        
                            <i class="fa fa-forumbee"></i>Community
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/donation/">
                            
                        
                            <i class="fa fa-heart"></i>Donate
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/about/">
                            
                        
                            <i class="fa fa-user"></i>About
                        </a>
                    </li>
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                     
                     
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            </ul>
        </nav>
    </div>
</header>



        <div class="page clearfix" post>
    <div class="left">
        <h1>A luarocks build plugin for lua module with c/c++ based on xmake</h1>
        <div class="label">

            <div class="label-card">
                <i class="fa fa-calendar"></i>2021-01-22
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
            


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


            </div>

            <div class="label-card">
            
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <!--a href="/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a-->
        <a href="/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <!--a href="/tag/#lua" title="Tag: lua" rel="tag">lua</a-->
        <a href="/tag/#lua" title="Tag: lua" rel="tag">lua</a>&nbsp;
    
        <!--a href="/tag/#C%2FC%2B%2B" title="Tag: C/C++" rel="tag">C/C++</a-->
        <a href="/tag/#C/C++" title="Tag: C/C++" rel="tag">C/C++</a>&nbsp;
    
        <!--a href="/tag/#toolchains" title="Tag: toolchains" rel="tag">toolchains</a-->
        <a href="/tag/#toolchains" title="Tag: toolchains" rel="tag">toolchains</a>&nbsp;
    
        <!--a href="/tag/#xrepo" title="Tag: xrepo" rel="tag">xrepo</a-->
        <a href="/tag/#xrepo" title="Tag: xrepo" rel="tag">xrepo</a>&nbsp;
    
        <!--a href="/tag/#packages" title="Tag: packages" rel="tag">packages</a-->
        <a href="/tag/#packages" title="Tag: packages" rel="tag">packages</a>&nbsp;
    
        <!--a href="/tag/#vcpkg" title="Tag: vcpkg" rel="tag">vcpkg</a-->
        <a href="/tag/#vcpkg" title="Tag: vcpkg" rel="tag">vcpkg</a>&nbsp;
    
        <!--a href="/tag/#conan" title="Tag: conan" rel="tag">conan</a-->
        <a href="/tag/#conan" title="Tag: conan" rel="tag">conan</a>&nbsp;
    
        <!--a href="/tag/#Apple" title="Tag: Apple" rel="tag">Apple</a-->
        <a href="/tag/#Apple" title="Tag: Apple" rel="tag">Apple</a>&nbsp;
    
        <!--a href="/tag/#Silicon" title="Tag: Silicon" rel="tag">Silicon</a-->
        <a href="/tag/#Silicon" title="Tag: Silicon" rel="tag">Silicon</a>
    
  

</span>

            </div>

        </div>
        <hr>
        <article itemscope itemtype="http://schema.org/BlogPosting">
        <p><a href="https://luarocks.org/">luarocks</a> is a package management tool of lua, which provides the installation and integration of various lua modules.</p>

<p>When users install lua modules, it will use the built-in build system to build lua module with c/c++ codes.</p>

<p>However, it’s build system only provides simple configuration. For complex c/c++ modules, it is a little bit powerless, and it cannot be flexibly switch the toolchain.</p>

<p>Although it also provides other back-ends (make, cmake), but make/makefile is also not flexible enough,
and cmake requires users to install the cmake program in advance, otherwise the installation of the lua module will be interrupted.</p>

<p>Here, I have implemented a luarocks plugin <a href="https://github.com/xmake-io/luarocks-build-xmake">luarocks-build-xmake</a> based on xmake to build lua c/c++ modules
to achieve more flexible and convenient lua module maintenance.</p>

<p>Compared with the builtin build system of luarocks, it provides a more powerful build configuration and supports c/c++ dependency management.
Compared with cmake, it does not require users to manually install xmake. This plugin will automatically install xmake and directly compile lua modules.
In terms of users, no additional operations are required.</p>

<ul>
  <li><a href="https://github.com/xmake-io/luarocks-build-xmake">luarocks-build-xmake</a></li>
  <li><a href="https://github.com/xmake-io/xmake">xmake</a></li>
</ul>

<h3 id="example1-with-xmakelua">Example1 (with xmake.lua)</h3>

<p>We can build c/c++ modules if the project contain xmake.lua</p>

<div class="highlighter-rouge"><pre class="highlight"><code>├── src
│   ├── test.c
│   └── test.h
└── xmake.lua
</code></pre>
</div>

<h4 id="xmakelua">xmake.lua</h4>

<p>We need to use <code class="highlighter-rouge">add_rules("luarocks.module")</code> to add build rules for luarocks modules.</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">add_rules</span><span class="p">(</span><span class="s2">"mode.debug"</span><span class="p">,</span> <span class="s2">"mode.release"</span><span class="p">)</span>

<span class="n">target</span><span class="p">(</span><span class="s2">"example1.hello"</span><span class="p">)</span>
    <span class="n">add_rules</span><span class="p">(</span><span class="s2">"luarocks.module"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/test.c"</span><span class="p">)</span>
</code></pre>
</div>

<h4 id="rockspec">rockspec</h4>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">package</span> <span class="o">=</span> <span class="s2">"example1"</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">"1.0-1"</span>
<span class="n">source</span> <span class="o">=</span> <span class="p">{</span>
    <span class="n">url</span> <span class="o">=</span> <span class="s2">"git://github.com/xmake-io/luarocks-build-xmake"</span><span class="p">,</span>
    <span class="n">tag</span> <span class="o">=</span> <span class="s2">"example1"</span>
<span class="p">}</span>
<span class="n">dependencies</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s2">"lua &gt;= 5.1"</span><span class="p">,</span>
    <span class="s2">"luarocks-build-xmake"</span>
<span class="p">}</span>
<span class="n">build</span> <span class="o">=</span> <span class="p">{</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="s2">"xmake"</span><span class="p">,</span>
    <span class="n">copy_directories</span> <span class="o">=</span> <span class="p">{}</span>
<span class="p">}</span>
</code></pre>
</div>

<h3 id="example2-without-xmakelua">Example2 (without xmake.lua)</h3>

<p>We can use xmake as builtin build type to build c/c++ modules if the project does not contain xmake.lua</p>

<div class="highlighter-rouge"><pre class="highlight"><code>├── src
    ├── test.c
    └── test.h
</code></pre>
</div>

<h4 id="rockspec-1">rockspec</h4>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">package</span> <span class="o">=</span> <span class="s2">"example2"</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">"1.0-1"</span>
<span class="n">source</span> <span class="o">=</span> <span class="p">{</span>
    <span class="n">url</span> <span class="o">=</span> <span class="s2">"git://github.com/xmake-io/luarocks-build-xmake"</span><span class="p">,</span>
    <span class="n">tag</span> <span class="o">=</span> <span class="s2">"example2"</span>
<span class="p">}</span>
<span class="n">dependencies</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s2">"lua &gt;= 5.1"</span><span class="p">,</span>
    <span class="s2">"luarocks-build-xmake"</span>
<span class="p">}</span>
<span class="n">build</span> <span class="o">=</span> <span class="p">{</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="s2">"xmake"</span><span class="p">,</span>
    <span class="n">modules</span> <span class="o">=</span> <span class="p">{</span>
        <span class="p">[</span><span class="s2">"example2.hello"</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
            <span class="n">sources</span> <span class="o">=</span> <span class="s2">"src/test.c"</span>
        <span class="p">}</span>
    <span class="p">},</span>
    <span class="n">copy_directories</span> <span class="o">=</span> <span class="p">{}</span>
<span class="p">}</span>
</code></pre>
</div>

<h3 id="set-special-xmake-version">Set special xmake version</h3>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">dependencies</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s2">"lua &gt;= 5.1"</span><span class="p">,</span>
    <span class="s2">"luarocks-build-xmake"</span>
<span class="p">}</span>
<span class="n">build</span> <span class="o">=</span> <span class="p">{</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="s2">"xmake"</span><span class="p">,</span>
    <span class="n">variables</span> <span class="o">=</span> <span class="p">{</span>
        <span class="n">xmake</span> <span class="o">=</span> <span class="p">{</span>
            <span class="n">version</span> <span class="o">=</span> <span class="s2">"2.5.1"</span>
        <span class="p">}</span>
    <span class="p">},</span>
    <span class="n">copy_directories</span> <span class="o">=</span> <span class="p">{}</span>
<span class="p">}</span>
</code></pre>
</div>

<h3 id="set-xmake-compilation-configuration">Set xmake compilation configuration</h3>

<p>This plugin provides more flexible toolchain configuration, such as switching to the mingw toolchain, or switching between vs and sdk versions,
modifying the vs runtime library, or switching to debug compilation mode, etc.</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">dependencies</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s2">"lua &gt;= 5.1"</span><span class="p">,</span>
    <span class="s2">"luarocks-build-xmake"</span>
<span class="p">}</span>
<span class="n">build</span> <span class="o">=</span> <span class="p">{</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="s2">"xmake"</span><span class="p">,</span>
    <span class="n">variables</span> <span class="o">=</span> <span class="p">{</span>
        <span class="n">xmake</span> <span class="o">=</span> <span class="p">{</span>
            <span class="n">plat</span> <span class="o">=</span> <span class="s2">"mingw"</span><span class="p">,</span>
            <span class="n">arch</span> <span class="o">=</span> <span class="s2">"x86_64"</span><span class="p">,</span>
            <span class="n">mode</span> <span class="o">=</span> <span class="s2">"debug"</span><span class="p">,</span>
            <span class="n">cflags</span> <span class="o">=</span> <span class="s2">"-DTEST1"</span><span class="p">,</span>
            <span class="n">cc</span> <span class="o">=</span> <span class="s2">"gcc"</span><span class="p">,</span>
            <span class="n">ld</span> <span class="o">=</span> <span class="s2">"gcc"</span><span class="p">,</span>
            <span class="n">ldflags</span> <span class="o">=</span> <span class="s2">"..."</span><span class="p">,</span>
            <span class="n">mingw</span> <span class="o">=</span> <span class="s2">"mingw sdk path"</span><span class="p">,</span>
            <span class="n">vs</span> <span class="o">=</span> <span class="s2">"2019"</span><span class="p">,</span>
            <span class="n">vs_runtime</span> <span class="o">=</span> <span class="s2">"MT"</span><span class="p">,</span>
            <span class="n">vs_toolset</span> <span class="o">=</span> <span class="s2">""</span><span class="p">,</span>
            <span class="n">vs_sdkver</span> <span class="o">=</span> <span class="s2">""</span><span class="p">,</span>
        <span class="p">}</span>
    <span class="p">},</span>
    <span class="n">copy_directories</span> <span class="o">=</span> <span class="p">{}</span>
<span class="p">}</span>
</code></pre>
</div>

        </article>
        <hr>

        <!-- baidu ads -->
        

        
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
                    
                    <h2 id="chinese">中文</h2>
                    <ul>
                    
                    <li class="relatedPost">
                        <a href="/cn/2021/01/22/luarocks-build-xmake-v1.0/">一个使用 xmake 构建 c/c++ 模块的 luarocks 插件
                        
                        </a>
                    </li>
                    
                    
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
        
            </ul>
        

        
        
            
            
            
                
                    
                        
                        <h2 id="similar_posts">Similar Posts</h2>
                        <ul>
                        
                        <li class="relatedPost">
                            <a href="/2021/12/17/xmake-update-v2.6.2/">Xmake v2.6.2 released, Support building Linux kernel driver module
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/12/03/xmake-update-v2.6.1/">xmake v2.6.1 released, Switch to Lua5.4 runtime, Support Rust and C++ mixed compilation
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/10/30/xmake-update-v2.5.9/">xmake v2.5.9 released, Improve C++20 Modules and support Nim, Keil MDK and Unity Build
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/10/08/xmake-update-v2.5.8/">xmake v2.5.8 is released, Support Pascal/Swig program and Lua53 runtime
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/08/29/xmake-update-v2.5.7/">xmake v2.5.7 released, Use lockfile to freeze package dependencies and Vala/Metal language support
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
        
            </ul>
        

        <div class="post-recent">
    <div class="pre">

        

        

        
        
        

        

        

        
        
        <p><strong>Prev Post</strong> <a href="/2021/01/16/xmake-update-v2.5.1/">xmake v2.5.1 released, Support for Apple Silicon and more powerful C/C++ package management</a></p>
        
    </div>

    <div class="nex">

        

        

        
        
        

        

        

        
        
        <p><strong>Next Post</strong> <a href="/2021/02/27/xmake-update-v2.5.2/">xmake v2.5.2 released, Support pull remote cross-toolchain and package integration</a></p>
        
    </div>
</div>


        <h2 id="comments">Comments</h2>
        






<div id="gitalk-container"></div>
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>

<script>
const gitalk = new Gitalk({
  clientID: '73946dc1d9e2276ad0da',
  clientSecret: '12a3cb94361ba3ebc6ecb68cf80d592bfaa8106d',
  repo: 'tboox.github.io',
  owner: 'waruqi',
  admin: ['waruqi'],
  id: location.pathname,      
  language: 'en',
  distractionFreeMode: false  
})

gitalk.render('gitalk-container')
</script>





    </div>
    <button class="anchor"><i class="fa fa-anchor"></i></button>
    <div class="right">
        <div class="wrap">


            <!-- codefund ads -->
            

            <!-- Content -->
            <div class="side content">
                <div>
                    Content
                </div>
                <ul id="content-side" class="content-ul">
                    <li><a href="#chinese">中文</a></li>
                    <li><a href="#similar_posts">Similar Posts</a></li>
                    <li><a href="#comments">Comments</a></li>
                </ul>
            </div>

            <!-- baidu ads -->
            

            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    Links
                </div>
                <ul class="content-ul">
                  <li><a href="http://github.com/waruqi/tbox">tbox</a></li>
                  <li><a href="http://www.xmake.io">xmake</a></li>
                  <li><a href="https://github.com/waruqi">github</a></li>
                </ul>
            </div> 

            <!-- google ads -->
            

            <!-- baidu ads -->
            

            <!-- chitika ads -->
            
        </div>
    </div>

    <!-- baidu ads -->
    
</div>
<script>
/**
 * target _blank
 */
(function() {
    var aTags = document.querySelectorAll('article a:not([id])')
    for (var i = 0; i < aTags.length; i++) {
        aTags[i].setAttribute('target', '_blank')
    }
}());
</script>
<script src="/js/pageContent.js " charset="utf-8"></script>



    <footer class="site-footer">
    <div class="wrapper">
        <p class="description">
             Copyright (c) 2016-2020 tboox.org 
        </p>
        <p class="contact">
            
            <a href="https://github.com/waruqi" title="GitHub"><i class="fa fa-github" aria-hidden="true"></i></a> 
             
            
            <a href="mailto:waruqi@gmail.com" title="email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
            
            
            <a href="https://twitter.com/waruqi" title="Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
            
            <a href="/feed.xml" title="feed"><i class="fa fa-feed" aria-hidden="true"></i></a> 
        </p>
        <p class="power">
            <span>
                Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/Gaohaoyang">HyG</a> & <a href="https://pages.github.com/">Github Pages</a>.
            </span>
        </p>
    </div>
</footer>

    <div class="back-to-top">
    <a href="#top" class="scroll">
        <i class="fa fa-arrow-up" aria-hidden="true"></i>
    </a>
</div>

    <script src=" /js/main.js " charset="utf-8"></script>
    <script src=" /js/scroll.min.js " charset="utf-8"></script>
  </body>

</html>
